<?php

use think\facade\Route;

Route::group(':version', function () {

  //刷新token
  Route::post('refresh-token', ':version.Common/refreshToken');
  //登录
  Route::post('login', ':version.Index/login');
  //获取登录页视频
  Route::get('video_list', ':version.Index/videoList');
  
  //qq一键登录
  Route::get('qqLogin', ':version.Index/qqLogin');

  Route::get('qqCodelogin', ':version.Index/qqCodelogin');

  //退出
  Route::post('logout', ':version.Index/logout');
  //一键获取手机号
  Route::post('get-phone-number', ':version.User/getPhoneNumber');
  //是否登录 
  Route::post('is-login', ':version.Home/isLogin');
  //获取验证码 
  Route::post('send-mobile-code', ':version.User/sendMobileCode');
  //获取用户资料
  Route::get('profile', ':version.Index/profile');
  //用户注册
  Route::post('register', ':version.Index/userRegister');
  //更改密码
  Route::post('change-password', ':version.Index/changePassword');
  //设置密码
  Route::post('set-password', ':version.user/setPassword');
  //用户头像
  Route::post('upload-avatar', ':version.Index/uploadAvatar');
  //修改用户信息
  Route::post('update-user-info', ':version.User/updateUserInfo');
  //忘记登录密码
  Route::post('forget-password', ':version.User/forgetPassword');
  //绑定手机，邮箱，名称
  Route::post('change-bind', ':version.Index/changeBind');
  //首页轮播图
  Route::get('banner', ':version.Home/getBannerList');
  //文章公告
  Route::get('article', ':version.Home/getArticleList');
  //文章详情
  Route::get('article-detail', ':version.Home/getArticleDetail');
  //文章类型
  Route::get('article-type', ':version.Home/getArticleTypeList');
  //金刚区
  Route::get('navigaion', ':version.Home/getNavigaion');
  //获取产品图片
  Route::get('product-list', ':version.Product/list');

  //获取用户入住天数
  Route::get('user-day', ':version.User/getUserRegDay');
  //我的收藏
  Route::get('collect-list', ':version.User/collectList');
  //用户下载列表
  Route::get('user-download-list', ':version.User/userDownloadList');
  
  //底部导航
  Route::get('footer-nav', ':version.Nav/footerNav');
  Route::get('footer-other-nav', ':version.Nav/footerOtherNav');
  //站点配置文件
  Route::get('web-site-config', ':version.Home/webConfigSite');
  //热门搜索
  Route::get('hot-search', ':version.Home/hotSearch');
  //获取用户个人中心菜单
  Route::get('user-menu', ':version.User/userMenuList');
  ///收藏OR取消
  Route::get('product-care', ':version.Product/careProduct');

  //获取下载地址
  Route::get('product-download', ':version.FileController/downloadFromQiniu');
  //添加用户的下载记录
  Route::post('download-log', ':version.FileController/insertUserDownloadLog');
  ///喜不喜欢
  Route::get('not-like', ':version.Product/notLickProduct');
  //产品详情
  Route::post('product-detail', ':version.Product/productDetail');
  //用户足迹记录
  Route::get('user-history', ':version.User/userHistoryAction');
  //产品推荐
  Route::post('product-recommend', ':version.Product/productRecommend');
  //产品分类
  Route::post('product-class', ':version.Product/classProduct');
  //vip类型
  Route::get('vip-class', ':version.Vip/vipTypeList');
  //历史+收藏+下载
  Route::get('coll-his-dow', ':version.User/collAndHisAndDowlond');
  //金币
  Route::get('coin-list', ':version.Coin/coinList');
  //支付类型
  Route::get('pay-type-list',':version.Order/payTypeList');
  //支付
  //支付业务
  // Route::post('pay', ':version.PayCon/payService');
  //通知 支付成功

  
  Route::any("notice_url", ':version.PayCon/noticeUrl');
  //退款 -- 退款通知 --暂未写
  Route::post("refundsnotify", ':version.PayCon/refundsnotify');
  //会员模块
  Route::post('opened-user-member', ':version.User/openedUserMember');
  //充值余额
  Route::post('user-recharge-balance', ':version.User/userRechargeBalance');
  //充值记录
  Route::get('balance', ':version.User/balance');
  //会员充值
  Route::get('member', ':version.User/member');
  //发送内容到指定邮箱
  Route::post('seed-email', ':version.Ems/seed');
  //隐私协议
  Route::get('privacy-list', ':version.PrivacyAgreementCon/list');
  //网站悬浮菜单
  Route::get('help-btn', ':version.User/helpCenterBtn');
  //用户充值金额列表
  Route::get('recharge-list', ':version.RechargeCon/rechargeList');
  //视频
  Route::get('video-list', ':version.LiveVideo/videoList');
  //创建订单
  Route::post('create-order', ':version.Order/createOrder');
  //创建订单--未登录
  Route::post('subscribe-create-order', ':version.Order/subscribeCreateOrder');
  //订单列表
  Route::get('order-list', ':version.Order/orderList');
    //删除订单或者取消订单
  Route::post('cancel-and-order', ':version.Order/cancelAndDelOrder');

  //检查用户是否下载过是否超过3天
  Route::post('check-user-download', ':version.Product/checkUserDownload');
  //消息类型
  Route::get('message-class', ':version.Message/messageClassList');
  //消息列表
  Route::get('message-list', ':version.Message/messageList');
    //是否已读
  Route::post('is_read_msg', ':version.Message/isRead');

  
  //支付宝支付
  Route::post('alipay', ':version.PaymentCon/aliPayment');
  //支付宝回调函数
  Route::any("ali_notice_url", ':version.PayCon/aliNoticeUrl');
  //检查订单是否支付
  Route::post('check-pay', ':version.PaymentCon/checkPay');
  //模拟支付成功
  Route::post('paySuccess', ':version.PaymentCon/paySuccess');
  //微信支付+支付宝支付
  Route::post('do-payment', ':version.PaymentCon/doPayment');
  //微信支付回调
  Route::any("wx_notice_url", ':version.PayCon/wxPayNoticeUrl');
  //微信支付
  Route::post('wxpay', ':version.PaymentCon/wxPayment');
  //常见问题
  Route::get('asked_question', ':version.Question/askedQuestion');
  //问题类型
  Route::get('question-class', ':version.Question/questionClass');
  
  //发票模块
  //申请发票
  Route::post('apply-invoice', ':version.InvoiceCon/applyInvoice');
  //保存客户申请表
  Route::post('save-customer', ':version.User/saveCustomer');
  
  //订阅
  Route::get('subscribe-list', ':version.Subscribe/subscribeList');

  //验证用户授权码
  Route::post('verify-user-auth-code', ':version.User/verifyUserAuthCode');

  Route::get('get-nav-by-id', ':version.Home/getNavById');
  

})->allowCrossDomain();
